package deploy;

import javax.swing.JFrame;

import com.googlecode.grtframework.vis.Displayer;
import com.googlecode.grtframework.vis.MountedPosition;
import com.googlecode.grtframework.vis.RootMount;
import com.googlecode.gunncs.mechanism.RobotBase;
import com.googlecode.gunncs.mechanism.RobotBaseFactory;

public class Main {

	public static void main(String[] args) throws InterruptedException {

		Displayer displayer = new Displayer();
		displayer.startPaintLoop();

		JFrame home = new JFrame("CreateSim");
		home.getContentPane().add(displayer);
		home.setVisible(true);
		home.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		MountedPosition robotPosition = new MountedPosition(RootMount.get(),
				200, 200, 0);
		RobotBase base = RobotBaseFactory.initSimulated(displayer,
				robotPosition, 50, "create");
		base.drive(.05, .05);
		// base.drive(0, .5);
		// Thread.sleep(10000);
		// base.drive(0, .0010);

		// int x = 1;
		// double speed = .001;
		// while (true) {
		//
		// if (speed < 0) {
		// x = 1;
		// }
		// if (speed > 1) {
		// x = -1;
		// }
		// speed += (.01 * x);
		// System.out.println(speed);
		// base.drive(0, speed);
		// Thread.sleep(50);
		// }
	}

}
